package lab03.test03;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * Created by Administrator on 2017/11/16.
 */
public class Text {
    public static void main(String[] args) throws IOException {
        String path="E:\\text.txt";
        //  字节流写文件
        FileOutputStream  fileOutputStream=null;
        try {
            fileOutputStream=new FileOutputStream(path);
            fileOutputStream.write("Beijing欢迎你！".getBytes());
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        finally {
            fileOutputStream.close();
        }
    }
}
